package com.wx.mall.goods.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author ljl
 * @since 2020-04-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("pro_sku")
@ApiModel(value="Sku对象", description="")
public class Sku implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "SKU id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "SKU编码")
    private String encode;

    @ApiModelProperty(value = "SKU名称")
    private String name;

    @ApiModelProperty(value = "价格（分）")
    private BigDecimal price;

    @ApiModelProperty(value = "库存数量")
    private Integer repertory;

    @ApiModelProperty(value = "库存预警数量")
    private Integer warning;

    @ApiModelProperty(value = "SKU主图 JSON格式的对象")
    private String image;

    @ApiModelProperty(value = "图片对象列表")
    private String images;

    @ApiModelProperty(value = "创建时间 timestamp 起始时间为1970年 超过这个时间将报错")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "SPU的ID")
    private Integer spuId;

    @ApiModelProperty(value = "规格列表 以key:value结构；分割的方式存储")
    private String spec;

    @ApiModelProperty(value = "销量")
    private Integer sale;

    @ApiModelProperty(value = "评论数")
    private Integer comment;

    @ApiModelProperty(value = "SKU状态  0 待上架 1 正常  2 下架  3无货")
    private Integer status;

    @ApiModelProperty(value = "是以UUID命名空间方式生成的唯一ID 用以区别 和选择")
    private String uuid;

}
